package com.lovo.csc.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDate;

@Getter
@Setter
@NoArgsConstructor
@TableName("scheme")
public class SchemeBean {
    @TableId(value = "pk_procurementId",type = IdType.AUTO)
    @ApiModelProperty(value = "采购表id")
    private long procurementId;

    @TableField("s_idNum")
    @ApiModelProperty(value = "采购方案编号")
    private Long idNum;

    @TableField("s_procurement_reason")
    @ApiModelProperty(value = "采购理由")
    private String procurementReason;

    @TableField("s_status")
    @ApiModelProperty(value = "审核状态 0-待审核 1-审核通过 2-审核失败")
    private int status = 0;

    @TableField("s_applicant")
    @ApiModelProperty(value = "采购申请人")
    private String applicant;

    @TableField("s_create_date")
    @ApiModelProperty(value = "申请时间")
    private LocalDate createDate = LocalDate.now();

    @TableField("s_content")
    @ApiModelProperty(value = "采购内容")
    private String content;

    @TableField("s_refuse")
    @ApiModelProperty(value = "审核理由")
    private String refuse;

    @TableField("s_adminName")
    @ApiModelProperty(value = "审核人")
    private String adminName;

    @TableField("s_dealDate")
    @ApiModelProperty(value = "审批时间")
    private LocalDate dealDate;
    /**
     * 采购数量
     */
    @TableField("s_num")
    private int num;
    /**
     * 采购订单总价格
     */
    @TableField("s_money")
    private float money;

    public SchemeBean(Long idNum, String procurementReason,  String applicant, String content,int num,float money) {
        this.idNum = idNum;
        this.procurementReason = procurementReason;
        this.applicant = applicant;
        this.content = content;
        this.num = num;
        this.money = money;
    }
}
